﻿using Grpc.Core;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace UserService
{
    public class CustomerService:Customer.CustomerBase
    {
        private readonly ILogger<CustomerService> _logger;
        public CustomerService(ILogger<CustomerService> logger)
        {
            _logger = logger;
        }

        public override Task<Result> GetPage(OrderSearch request, ServerCallContext context)
        {
            _logger.LogInformation("来自于GRPC客户端请求...");
            Result result = new Result();
            result.Status = 200;
            result.Msg = "";
            return Task.FromResult(new Result()
            {
                Status = 200,
                Msg = "成功啦..."
            }) ;
        }
    }
}
